<template>
  <div class="xia-1">
    <div class="x-1">
      <div class="xi-1">教室汇总</div>
      <div class="xi-2" v-for="(item, index) in sun1" :key="index">
        <div class="c-1">{{ item.name }}</div>
        <div class="c-2">{{ item.value }}</div>
        <div class="c-3">间</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { getVideoTotal1 } from '@/services/index'
import type { arr5 } from '@/types'
const sun1 = ref<arr5>()
const sun = async () => {
  const res = await getVideoTotal1()
  sun1.value = res.data
}
onMounted(() => {
  sun()
})
</script>

<style lang="scss" scoped>
.xia-1 {
  width: 340px;
  height: 400px;
  background-image: url('../../assets/img/z-1.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-sizing: border-box;
  padding: 10px;
  .x-1 {
    width: 300px;
    height: 190px;
    box-sizing: border-box;
    padding: 10px;
    color: rgb(255, 255, 255);
    font-weight: bold;
    font-family: 'Microsoft Yahei', Arial, 'sans-serif';
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .xi-2 {
    display: flex;
    margin: 20px 0;
    .c-1 {
      width: 220px;
      height: 30px;
      font-size: 18px;
      color: white;
    }
    .c-2 {
      width: 40px;
      height: 30px;
      font-size: 18px;
      color: white;
    }
    .c-3 {
      width: 40px;
      height: 30px;
      font-size: 18px;
      color: white;
    }
  }
}
</style>
